import request from '@/utils/request'

// 费用科目
export const storeFinanceCoaDel = data => {
  return request({
    url: '/business-server/storeFinanceIncomeCoa/del',
    method: 'post',
    data
  })
}

export const storeFinanceCoaList = data => {
  return request({
    url: '/business-server/storeFinanceIncomeCoa/page',
    method: 'post',
    data
  })
}

export const addIncomeFinanceCoa = data => {
  return request({
    url: '/business-server/storeFinanceIncomeCoa/addIncomeFinanceCoa',
    method: 'post',
    data
  })
}

export const updateIncomeFinanceCoa = data => {
  return request({
    url: '/business-server/storeFinanceIncomeCoa/updateIncomeFinanceCoa',
    method: 'post',
    data
  })
}

export const storeFinanceIncomeCoaQueryById = data => {
  return request({
    url: '/business-server/storeFinanceIncomeCoa/queryById',
    method: 'get',
    params: data
  })
}

export const incomeAndExpenditure = data => {
  return request({
    url: '/business-server/storeReportForm/incomeAndExpenditure',
    method: 'post',
    data
  })
}

export const storeSettlementInfo = data => {
  return request({
    url: '/business-server/storeSettlementInfo/page',
    method: 'post',
    data
  })
}

export const storeSettlementInfoDetail = data => {
  return request({
    url: '/business-server/storeSettlementInfo/detailPage',
    method: 'post',
    data
  })
}

//养护单退货分页查询
export const applyPage = data => {
  return request({
    url: '/business-server/omsOrderMasterApply/page',
    method: 'post',
    data
  })
}
//养护单退货新增
export const addApply = data => {
  return request({
    url: '/business-server/omsOrderMasterApply/addMasterApply',
    method: 'post',
    data
  })
}

//养护单退货列表
export const applyList = data => {
  return request({
    url: '/business-server/omsOrderMasterApply/list',
    method: 'post',
    data
  })
}

//指定商品退货
export const backProduct = data => {
  return request({
    url: '/business-server/omsOrderMasterApply/backProduct',
    method: 'post',
    data
  })
}

export const syncFinance = data => {
  return request({
    url: '/business-server/storeFinanceIncomeCoa/syncFinance',
    method: 'post',
    data
  })
}

export const incomeCoaConfirm = data => {
  return request({
    url: '/business-server/storeFinanceIncomeCoa/confirm',
    method: 'post',
    data
  })
}
